package com.mes.material.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.mes.material.mapper.MaterialTransactionMapper;
import com.mes.material.domain.MaterialTransaction;
import com.mes.material.service.IMaterialTransactionService;

/**
 * 领料与退料Service业务层处理
 * 
 * @author itflash
 * @date 2025-02-27
 */
@Service
public class MaterialTransactionServiceImpl implements IMaterialTransactionService 
{
    @Autowired
    private MaterialTransactionMapper materialTransactionMapper;

    /**
     * 查询领料与退料
     * 
     * @param id 领料与退料主键
     * @return 领料与退料
     */
    @Override
    public MaterialTransaction selectMaterialTransactionById(Long id)
    {
        return materialTransactionMapper.selectMaterialTransactionById(id);
    }

    /**
     * 查询领料与退料列表
     * 
     * @param materialTransaction 领料与退料
     * @return 领料与退料
     */
    @Override
    public List<MaterialTransaction> selectMaterialTransactionList(MaterialTransaction materialTransaction)
    {
        return materialTransactionMapper.selectMaterialTransactionList(materialTransaction);
    }

    /**
     * 新增领料与退料
     * 
     * @param materialTransaction 领料与退料
     * @return 结果
     */
    @Override
    public int insertMaterialTransaction(MaterialTransaction materialTransaction)
    {
        return materialTransactionMapper.insertMaterialTransaction(materialTransaction);
    }

    /**
     * 修改领料与退料
     * 
     * @param materialTransaction 领料与退料
     * @return 结果
     */
    @Override
    public int updateMaterialTransaction(MaterialTransaction materialTransaction)
    {
        return materialTransactionMapper.updateMaterialTransaction(materialTransaction);
    }

    /**
     * 批量删除领料与退料
     * 
     * @param ids 需要删除的领料与退料主键
     * @return 结果
     */
    @Override
    public int deleteMaterialTransactionByIds(Long[] ids)
    {
        return materialTransactionMapper.deleteMaterialTransactionByIds(ids);
    }

    /**
     * 删除领料与退料信息
     * 
     * @param id 领料与退料主键
     * @return 结果
     */
    @Override
    public int deleteMaterialTransactionById(Long id)
    {
        return materialTransactionMapper.deleteMaterialTransactionById(id);
    }
}
